package com.wframe.project.jnd.util;

import com.frame.database.JdataBean;
import com.wframe.project.jnd.entity.Promotion;
import com.wframe.project.jnd.rest.util.ClientException;
import com.wframe.project.jnd.services.PromotionService;
import com.wframe.project.jnd.vo.CartBean;
import com.wframe.project.jnd.vo.CartItem;
import com.wframe.project.jnd.vo.CartProductVO;
import com.wframe.project.jnd.vo.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Created by lwb on 2017/6/5.
 */
@Component
public class BuySendPromotionBuilder implements PromotionBuilder {
    @Autowired
    private PromotionService promotionService;

    @Override
    public Promotion build(String promotionId) throws Exception {
        return promotionService.findBuySend(promotionId);
    }

    @Override
    public boolean checkInventoryChange(Map<String, Integer> session, CartBean tempProductStock) {
        return false;
    }


    @Override
    public CartBean getCartProducts(String userid, String promotionId, List<CartItem> items, int platform, Map<String, Integer> tempProductStock) throws Exception {
        return null;
    }

    @Override
    public CartBean process(Map.Entry<String, List<JdataBean>> entry, Map<String, Integer> tempProductStock) throws Exception {
        return null;
    }

}
